
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';

const MyChartsMeta: IPublicTypeComponentMetadata = {
  "componentName": "MyCharts",
  "title": "MyCharts",
  "docUrl": "",
  "screenshot": "",
  "devMode": "proCode",
  "npm": {
    "package": "test",
    "version": "0.1.0",
    "exportName": "MyCharts",
    "main": "src/index.tsx",
    "destructuring": true,
    "subName": ""
  },
  "configure": {
    "props": [
      {
        "title": {
          "label": {
            "type": "i18n",
            "en-US": "name",
            "zh-CN": "name"
          }
        },
        "name": "name",
        "setter": {
          "componentName": "StringSetter",
          "isRequired": false,
          "initialValue": ""
        }
      },
      {
        type: 'group',
        title: '环形图',
        display: 'block',
        items:[
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "pieDataUrl",
                "zh-CN": "环形图数据源"
              }
            },
            "name": "pieDataUrl",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "http://localhost:8080/api/v1/data/distribution"
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "环形图数据域",
                "zh-CN": "pieAngleField"
              }
            },
            "name": "pieAngleField",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "value"
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "pieColorField",
                "zh-CN": "环形图分类域"
              }
            },
            "name": "pieColorField",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "type"
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "pieText",
                "zh-CN": "环形图文本"
              }
            },
            "name": "pieText",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "库存分布"
            }
          },

        ]
      },
      {
        type: 'group',
        title: '仪表盘',
        display: 'block',
        items:[
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "gaugeDataUrl",
                "zh-CN": "仪表盘数据源"
              }
            },
            "name": "gaugeDataUrl",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "http://localhost:8080/api/v1/data/useRate"
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "gaugeTarget",
                "zh-CN": "仪表盘当前值"
              }
            },
            "name": "gaugeTarget",
            "setter": {
              "componentName": "NumberSetter",
              "isRequired": false,
              "initialValue": ""
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "gaugeTotal",
                "zh-CN": "仪表盘总值"
              }
            },
            "name": "gaugeTotal",
            "setter": {
              "componentName": "NumberSetter",
              "isRequired": false,
              "initialValue": ""
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "gaugeName",
                "zh-CN": "仪表盘名称"
              }
            },
            "name": "gaugeName",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": ""
            }
          },
        ]
      },
      {
        type: 'group',
        title: '柱状图',
        display: 'block',
        items:[
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "dualAxesDataUrl",
                "zh-CN": "柱状图数据源"
              }
            },
            "name": "dualAxesDataUrl",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "http://localhost:8080/api/v1/data/saleCount"
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "dualAxesXField",
                "zh-CN": "柱状图横坐标"
              }
            },
            "name": "dualAxesXField",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "date"
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "dualAxesIntervalYField",
                "zh-CN": "直方图纵坐标"
              }
            },
            "name": "dualAxesIntervalYField",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": "value"
            }
          },
          {
            "title": {
              "label": {
                "type": "i18n",
                "en-US": "dualAxesLineYField",
                "zh-CN": "折线图纵坐标"
              }
            },
            "name": "dualAxesLineYField",
            "setter": {
              "componentName": "StringSetter",
              "isRequired": false,
              "initialValue": ""
            }
          },
        ]
      },

      
      
    ],
    "supports": {
      "style": true
    },
    "component": {}
  }
};
const snippets: IPublicTypeSnippet[] = [
  {
    "title": "MyCharts",
    "screenshot": "",
    "schema": {
      "componentName": "MyCharts",
      "props": {}
    }
  }
];

export default {
  ...MyChartsMeta,
  snippets
};
